cmake_minimum_required(VERSION 2.8)

#Configuration du projet
project(DefendYourDesktop)

#IF(UNIX)
#SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin/Linux)
#ENDIF()

#IF(WINDOWS)
#SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin/Windows)
#ENDIF()

set(CMAKE_CXX_COMPILER "g++")
set(CMAKE_CXX_FLAGS "-std=gnu++11 -W -Wall -Wzero-as-null-pointer-constant")

#Configuration de l'exécutable
set(
  SOURCES
  src/main.cpp
  src/Game.cpp
  src/GameState.cpp
  src/InMenuState.cpp
  src/InGameState.cpp
  src/Panel.cpp
  src/LevelsProgressionBar.cpp
  src/StatusBar.cpp
  src/TowerPanel.cpp
  src/InfosPanel.cpp
  src/Board.cpp
  src/Tower.cpp
  src/PelletTower.cpp
  src/SquirtTower.cpp
  src/DartTower.cpp
  src/FrostTower.cpp
  src/SwarmTower.cpp
  src/Resource.cpp
  src/Exception.cpp
  )

include_directories(${CMAKE_SOURCE_DIR}/include)
include_directories(${SFML_include_dirs})

link_directories(${CMAKE_SOURCE_DIR}/lib)


add_executable(
  defendyourdesktop
  ${SOURCES}
  )

target_link_libraries(
  defendyourdesktop
  sfml-graphics
  sfml-window
  sfml-system
  )


